package org.doxla.oomwatch.observerable;

import java.util.List;


/**
 * An {@link AbstractOomWatcher} that has thresholdExeeded true when the
 * current memory useage for the Virtual Machine exceeds the threshold value.
 * 
 * @author danoxlade
 *
 */
public class MaxMemoryThreshHoldOomWatcher extends AbstractOomWatcher {
	
	public MaxMemoryThreshHoldOomWatcher(){
		super();
	}
	
	public MaxMemoryThreshHoldOomWatcher(List<OomObserver> obs, long threshold) {
		super(obs,threshold);
	}

	@Override
	public boolean thresholdExceeded() {
		return Runtime.getRuntime().totalMemory() > getThreshold();
	}

}
